package com.phospherus.flow.repository

import com.phospherus.common.repository.BaseRepository
import com.phospherus.flow.entity.FormInst
import org.springframework.data.jpa.repository.Modifying
import org.springframework.data.jpa.repository.Query
import org.springframework.data.repository.query.Param

/**
 * @author songjinlong
 * @version 1.0
 * @since 2017/12/21
 */
interface FormInstRepository : BaseRepository<FormInst, Long> {
    @Modifying
    @Query("update form_inst set form_inst_status = :status where id= :formInstId", nativeQuery = true)
    fun modifyFormInstStatus(@Param("formInstId") formInstId: Long, @Param("status") status: Int)
}